#pragma once
#ifndef FakeNode_H
#define FakeNode_H

#include "List.h"
#include "Referenced.h"
#include "IntrusivePointer.h"
#include "LayoutNode.h"

namespace fusion
{
	namespace mode10
	{
		class Node : public fusion::Referenced
		{
		public:
			Node(int name, unsigned int id);
			~Node(void);

			void SetRelatedLayout(Ref<LayoutNode> wrap);
			Ref<LayoutNode> GetRelatedLayout();

			int getName() { return m_name; }
			unsigned int getID() { return m_id; }
			// for test, these property is public

			void AddChild(fusion::Ref<Node>& child)
			{
				if (child == this)
					return;
				m_children.push_back(child);
				child->m_parent = this;
			}
			fusion::Ref<Node> m_parent;
			fusion::List<fusion::Ref<Node> > m_children;

			int m_name;
			unsigned int m_id;
			int sizeX;
			int sizeY;
		private:
			Ref<LayoutNode> m_wrap;
		};
	}
}

#endif